var width = "130";
var offsetx = 2;
var offsety = 8;

var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;

var dStyle;
document.onmousemove = mEvn;

function mOvr(v) {
	var s,festival,spcday;
	var sObj=eval("GD" + v);
	//alert(v);
	dStyle = eval("detail" + v + ".style");
	sObj.style.cursor = 's-resize';

    if (snow == 0) {
       dStyle.left = x+offsetx-(width/2);
       dStyle.top = y+offsety;
       dStyle.visibility = "visible";
       snow = 1;
    }
}

//清除詳細資料
function mOut() {
	if ( cnt >= 1 ) { sw = 0; }
	if ( sw == 0 ) { snow = 0; dStyle.visibility = "hidden";}
	else cnt++;
}

//取得位置
function mEvn() {
	//x = event.x;
	//y = event.y;
	x = event.x + document.body.scrollLeft; 
	y = event.y + document.body.scrollTop;

	if (snow){
		dStyle.left = x+offsetx-(width/2);
		dStyle.top = y+offsety;
	}
}

function CheckBetLimit(Item1,Item2){
	var EventLimit = document.beMemberFrm["ELimits["+Item1+"][0]["+Item2+"]"].value;
	var BLimitLimit = document.beMemberFrm["ELimits["+Item1+"][1]["+Item2+"]"].value;
	if((EventLimit / 2) < BLimitLimit){
		alert("單注限額 ( "+BLimitLimit+" ) 不能超過單場限額一半 ( "+(EventLimit / 2)+" )！");
		document.beMemberFrm["ELimits["+Item1+"][1]["+Item2+"]"].focus();
		return false;
	}else{
		return true;
	}
}